package edu.uis.csc478.spring09.threeoxen.persistence.store.impl;

import edu.uis.csc478.spring09.threeoxen.persistence.store.GroceryItem;

/**
 * User: Chris Logan
 * Date: Apr 14, 2009
 * Time: 7:38:08 AM
 */
public class GroceryItemImpl implements GroceryItem {

    private String upcCode;
    private String name;
    private String brand;
    private String category;
    private int expirationPeriod;
    private int cubicSize;

    GroceryItemImpl() {
        
    }

    @Override
    public String getUpcCode() {
        return this.upcCode;
    }

    @Override
    public void setUpcCode(String upcCode) {
        this.upcCode = upcCode;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public void setName(String description) {
        this.name = description;
    }

    @Override
    public String getBrand() {
        return this.brand;
    }

    @Override
    public void setBrand(String brand) {
        this.brand = brand;
    }

    @Override
    public String getCategory() {
        return this.category;
    }

    @Override
    public void setCategory(String category) {
        this.category = category;
    }

    @Override
    public int getExpirationPeriod() {
        return this.expirationPeriod;
    }

    @Override
    public void setExpirationPeriod(int periodInDays) {
        this.expirationPeriod = periodInDays;
    }

    @Override
    public int getCubicSize() {
        return this.cubicSize;
    }

    @Override
    public void setCubicSize(int cubicSizeInInches) {
        this.cubicSize = cubicSizeInInches;
    }

    @Override
    public String toString() {
        StringBuffer buffer = new StringBuffer();
        buffer.append("UPC Code:").append(this.upcCode);
        buffer.append(", Name:").append(this.name);
        buffer.append(", Brand:").append(this.brand);
        buffer.append(", Category:").append(this.category);
        buffer.append(", Expiration Period:").append(this.expirationPeriod);
        buffer.append(", Cubic Storage Space:").append(this.cubicSize);
        return buffer.toString();
    }
}
